home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Franz PD
/
Franz PD Disk #113 (1991-01)(Amiga User Group Deutschland e.V.).zip
/
Franz PD Disk #113 (1991-01)(Amiga User Group Deutschland e.V.).adf
/
Rätsel
/
zweien
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1989-07-03
|
3KB
|
121 lines
'***********************************************************************
'* Detlef Kornatz *
'* Feuerbachstraße 6 *
'* D-4300 ESSEN 1 *
'***********************************************************************
SCREEN 2,320,258,5,1
WINDOW 2," 2 ? 2 ? 2 ? 2 ? 2 = 4",,0,2
PALETTE 0,0.34,0.44,0
PALETTE 1,0.2,0.2,0.2
PALETTE 2,0.76,0.97,0
PALETTE 3,0,0,0
COLOR 31,0
LOCATE 2,1:PRINT "Setzen Sie vier verschiedene Zeichen in"
LOCATE 4,1:PRINT "die vier Zwischenräume zwischen die "
LOCATE 6,1:PRINT "Ziffern der Gleichung,so daß x = 4"
LOCATE 8,1:PRINT "herauskommt.Es gibt zwei Möglichkeiten."
anfang:
COLOR 6,0
LOCATE 16,3:PRINT " 2 2 2 2 2 = x "
LOCATE 19,3:PRINT "Sie bekommen nur diese vier Zeichen."
LOCATE 22,3:PRINT " [ + ] [ - ] [ * ] [ / ] "
COLOR 17,0
LOCATE 29,4:PRINT "NEU"
LOCATE 29,10:PRINT "SETZEN"
LOCATE 29,20:PRINT "LÖSUNG"
COLOR 10,0
LOCATE 29,31:PRINT "ENDE"
taste:
ON MOUSE GOSUB mausdruck
MOUSE ON
WHILE 1 : WEND
mausdruck:
druck=MOUSE(0)
x=MOUSE(3) : y=MOUSE(4)
IF x>10 AND x<60 AND y>215 AND y<240 THEN GOSUB neu
IF x>70 AND x<135 AND y>215 AND y<240 THEN GOSUB zeich
IF x>230 AND x<270 AND y>215 AND y<240 THEN GOSUB ende
RETURN
aufloe:
LINE (0,0)-(310,210),0,bf
COLOR 9,0
LOCATE 16,3:PRINT " 2 - 2 / 2 + 2 * 2 = 4 "
LOCATE 18,3:PRINT " 2 / 2 + 2 * 2 - 2 = 4 "
RETURN
neu:
COLOR 5,0
LOCATE 16,3:PRINT " 2 2 2 2 2 = x "
LOCATE 22,3:PRINT " + , - , * , / "
zeich:
LINE (0,0)-(310,210),0,bf
COLOR 5,0
LOCATE 16,3:PRINT " 2 2 2 2 2 = "
LOCATE 22,3:PRINT " + , - , * , / "
a=2 : b=2:c=2 :d=2
COLOR 17,0
LOCATE 2,10: LINE INPUT "Zeichen 1 ";a$
LOCATE 16,8:PRINT a$
IF a$="-" THEN g=a-a
IF a$="+" THEN g=a+a
IF a$="*" THEN g=a*a
IF a$="/" THEN g=a/a
LOCATE 18,9: PRINT g
LOCATE 4,10: LINE INPUT "Zeichen 2 ";b$
LOCATE 16,13:PRINT b$
IF b$="-" THEN f=g-b
IF b$="+" THEN f=g+b
IF b$="*" THEN f=g*b
IF b$="/" THEN f=g/b
LOCATE 18,14: PRINT f
LOCATE 6,10: LINE INPUT "Zeichen 3 ";c$
LOCATE 16,17:PRINT c$
IF c$="-" THEN h=f-c
IF c$="+" THEN h=f+c
IF c$="*" THEN h=f*c
IF c$="/" THEN h=f/c
LOCATE 18,19:PRINT h
LOCATE 8,10: LINE INPUT "Zeichen 4 ";d$
LOCATE 16,22:PRINT d$
IF d$="-" THEN i=h-d
IF d$="+" THEN i=h+d
IF d$="*" THEN i=h*d
IF d$="/" THEN i=h/d
COLOR 6,0:LOCATE 16,31
PRINT i
IF i= 4 THEN LOCATE 18,30:PRINT "richtig" : SOUND 493.88,5,100:SOUND 293.66,5,100
IF i< 4 THEN LOCATE 18,30:PRINT "falsch" : BEEP
IF i> 4 THEN LOCATE 18,30:PRINT "falsch" : BEEP
ON MOUSE GOSUB mau
MOUSE ON
WHILE -1
WEND
mau:
dr=MOUSE(0)
x=MOUSE(1) : y=MOUSE(2)
IF x>10 AND x<60 AND y>215 AND y<240 THEN GOSUB neu
IF x>160 AND x<190 AND y>215 AND y<240 THEN GOSUB aufloe
IF x>230 AND x<270 AND y>215 AND y<240 THEN GOSUB ende
IF x>70 AND x<135 AND y>215 AND y<240 THEN GOSUB zeich
RETURN
ende:
WINDOW CLOSE 2
SCREEN CLOSE 2
SYSTEM
END
'**********************************************************************
' Detlef Kornatz
' Feuerbachstraße 6
' D-4300 ESSEN 1
'***********************************************************************